package com.example.xm.service.impl;

import com.example.xm.entity.Dizhientity;
import com.example.xm.mapper.DizhiMapper;
import com.example.xm.service.DizhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author tong
* @description 针对表【dizhi】的数据库操作Service实现
* @createDate 2024-04-13 12:37:40
*/
@Service
public class DizhiServiceImpl implements DizhiService {
@Autowired
    DizhiMapper dizhiMapper;
    @Override
    public void reg(Dizhientity dizhientity) {
        dizhiMapper.insert(dizhientity);
    }

    @Override
    public void delete(Integer id) {
        dizhiMapper.deleteBy(id);
    }

    @Override
    public List<Dizhientity> list(Integer userId) {
        return dizhiMapper.list(userId);
    }
}




